Skip to content

docs: update gas documentation after AccountCostIncrease NEP - #3086

Open
jancionear wants to merge 2 commits into
near:masterfrom
jancionear:account-cost
Open

docs: update gas documentation after AccountCostIncrease NEP#3086
jancionear wants to merge 2 commits into
near:masterfrom
jancionear:account-cost

Conversation

@jancionear

Copy link
Copy Markdown
Contributor

NEP-642 (Accoun Cost Increase) changed how gas buying, burning and refunds works. Let's update the documentation to reflect these changes.

I also noticed that the docs still talk about a 300 TGas gas limit on receipts, this was recently increased to 1PGas, so I updated the docs, changing 300 TGas to 1000 TGas.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates NEAR protocol documentation to reflect NEP-642 changes to gas purchasing/burning/refunds and the increased receipt gas limit (300 Tgas → 1000 Tgas), plus documents the fixed account-creation charge.

Changes:

  • Updates gas limit guidance across docs from 300 Tgas to 1000 Tgas.
  • Documents “buy price vs burn price” mechanics and how refunds now commonly include a price-difference component.
  • Adds/propagates the fixed 0.007Ⓝ account-creation charge context into relevant sections.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
web3-apps/tutorials/data-types.mdx Updates recommended attached gas guidance for calls to reflect the higher ceiling.
smart-contracts/anatomy/actions.mdx Adds a note clarifying the fixed account-creation charge and where it’s collected from.
protocol/transactions/transaction-execution.mdx Clarifies refund receipt semantics and links to the new buy/burn explanation.
protocol/transactions/meta-tx.mdx Updates meta-tx refund explanation to match buy vs burn pricing and upfront balance needs.
protocol/transactions/gas.mdx Main update: 1000 Tgas limits, buy vs burn model, refund behavior, and account-creation charge explanation.
protocol/storage/storage-staking.mdx Connects the 770-byte account allowance to the fixed account-creation charge.
protocol/accounts-contracts/access-keys.mdx Updates gas-key behavior to reflect buy/burn and refund mechanics and allowance implications.
Comments suppressed due to low confidence (2)

protocol/transactions/gas.mdx:71

  • This example says “At the minimum gas price (0.0001Ⓝ/Tgas) … buying 100Tgas deducts 0.1Ⓝ”, but 0.1Ⓝ corresponds to the purchase floor of 0.001Ⓝ/Tgas (per NEP-642), not 0.0001Ⓝ/Tgas. Reword to make it explicit which price is used for buying vs burning so the math isn’t confusing.
<Tip>
At the minimum gas price (`0.0001Ⓝ` per `Tgas`), buying `100Tgas` deducts `0.1Ⓝ` from your balance. If the transaction burns `50Tgas`, you get `0.095Ⓝ` back: `0.05Ⓝ` for the gas you didn't use, and `0.045Ⓝ` for the price difference on the gas you did. You paid `0.005Ⓝ`, exactly what those `50Tgas` are worth at the gas price.
</Tip>

protocol/transactions/gas.mdx:81

  • The “Cost for Common Actions” intro says the fees are calculated at the minimum gas price (0.0001Ⓝ/Tgas), but Create Account*** now includes a fixed 0.007Ⓝ charge (plus small send fees), so it’s not purely derived from gas_price * Tgas. Calling out the exception in this sentence would prevent confusion.
| Create Account***            | 7.92           | 0.00707  |

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread protocol/transactions/transaction-execution.mdx Outdated
Comment thread protocol/transactions/gas.mdx
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: NEW❗

Development

Successfully merging this pull request may close these issues.

2 participants